﻿<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  
  xmlns:controls="clr-namespace:System.Controls"
  xmlns:base="clr-namespace:System.Controls.Base">

  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="Common.xaml"/>
  </ResourceDictionary.MergedDictionaries>
  
  <ControlTemplate x:Key="controlTemplate" TargetType="controls:RadioGroup">
    
    <controls:GroupBox
      Header="{TemplateBinding base:Header.Content}"
      HeaderStringFormat="{TemplateBinding base:Header.StringFormat}"
      HeaderTemplate="{TemplateBinding base:Header.Template}"
      HeaderTemplateSelector="{TemplateBinding base:Header.TemplateSelector}"
      Background="{TemplateBinding Background}"
      BorderBrush="{TemplateBinding BorderBrush}"
      BorderThickness="{TemplateBinding BorderThickness}"
      Foreground="{TemplateBinding Foreground}">
      
      <ItemsPresenter />
      
    </controls:GroupBox>
    
  </ControlTemplate>
  
  <Style TargetType="controls:RadioGroup" BasedOn="{StaticResource {x:Type Control}}">

    <Setter Property="BorderThickness" Value="2"/>
    <Setter Property="CornerRadius" Value="5"/>
    <Setter Property="BorderBrush" Value="#C2A579"/>
    <Setter Property="Foreground"  Value="#FFE0E8D9"/>
    <Setter Property="Background" Value="#FF83550E"/>

    <Setter Property="Template" Value="{StaticResource controlTemplate}"/>
  </Style>
    
</ResourceDictionary>